#ifndef IMAGEBOX_H
#define IMAGEBOX_H

#include <wx/wx.h>
#include <wx/image.h>
#include <wx/numdlg.h>
#include <wx/dynarray.h>

// ----------------------------------------------------------------------------
// data class for images that need to be rendered
// ----------------------------------------------------------------------------



class ImageLoader : public wxScrolledWindow
{
public:
	int zoomer;

private:
	double m_zoomx ;
	double m_zoomy ;

	bool create_ok;
	bool dclick;
	bool centerOnParent;

	wxBitmap * Bitmap;	
	wxMenu *CreateDummyMenu();
   
public:		
	ImageLoader(wxWindow* parent);
	ImageLoader(wxWindow *parent,  char *bitmap);

    void LoadImage(wxImage image);
    void OnPaint(wxPaintEvent& event);
	void SetZoom(int z);
	void OnDoubleClick(wxMouseEvent& evt);
		
    wxBitmap * GetBitmap();
	wxImage * m_source_dublicate;
	void SetImage(unsigned char * bitmap);

	void ShowContextMenu(const wxPoint& pos);

    void OnRightUp(wxMouseEvent& event)
    {
		ShowContextMenu(event.GetPosition()); 
	}


	 void OnAbout(wxCommandEvent& event);
	 void OnDummy(wxCommandEvent& event);
	// void OnScroll(wxScrollEvent &event);
	 void ShowEff(wxShowEffect eff, unsigned transparent);



		
    DECLARE_EVENT_TABLE()
};



class ImagePreview : public wxDialog
{
public:
	
	void LoadImage(wxBitmap image);
	void OnPaint(wxPaintEvent& event);
	void OnExit(wxMouseEvent& WXUNUSED(evt));

	wxShowEffect m_effect;
    unsigned m_timeout;

 
	ImagePreview(wxShowEffect effect, unsigned timeout = 1000, unsigned transparent = 255);



	 void OnClose(wxCloseEvent& event);

	  DECLARE_EVENT_TABLE()
private:
	 wxBitmap Bitmap;

	
};
#endif
